import request from '@/utils/request'

// 创建购买订单
export function createSeekOrder(data) {
  return request({
    url: '/car/seek-order/create',
    method: 'post',
    data: data
  })
}

// 更新购买订单
export function updateSeekOrder(data) {
  return request({
    url: '/car/seek-order/update',
    method: 'put',
    data: data
  })
}

// 删除购买订单
export function deleteSeekOrder(id) {
  return request({
    url: '/car/seek-order/delete?id=' + id,
    method: 'delete'
  })
}

// 获得购买订单
export function getSeekOrder(id) {
  return request({
    url: '/car/seek-order/get?id=' + id,
    method: 'get'
  })
}

// 获得购买订单分页
export function getSeekOrderPage(query) {
  return request({
    url: '/car/seek-order/page',
    method: 'get',
    params: query
  })
}

// 导出购买订单 Excel
export function exportSeekOrderExcel(query) {
  return request({
    url: '/car/seek-order/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
